﻿using Coldairarrow.Entity;
using Coldairarrow.Entity.BTB_StaffUsers;
using Coldairarrow.Entity.Goods;
using Coldairarrow.Util;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Business
{
    public interface IBTB_CommentBusiness
    {
        Task<PageResult<BTB_Comment>> GetDataListAsync(PageInput<ConditionDTO> input);

        Task<BTB_Comment> GetTheDataAsync(string id);

        Task AddDataAsync(BTB_Comment data);

        Task UpdateDataAsync(BTB_Comment data);

        Task DeleteDataAsync(List<string> ids);

        /// <summary>
        /// 获取评论
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<BTB_CommentdTO>> GetDataTwoListAsync(PageInput<BTB_Comment> input);

        /// <summary>
        /// 获取评论
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<BTB_CommentdTO>> GetDataForeListAsync(PageInput<BTB_Comment> input);

        /// <summary>
        /// 审核内容
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        Task UpdateDataTwoAsync(List<BTB_CommenTwo> ids);

        /// <summary>
        /// 获取评论(前端)
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<BTB_CommentdTO>> GetDataThreeListAsync(PageInput<BTB_Comment> input);

        /// <summary>
        /// 获取评论
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        BTB_CommentD Getsatisfaction(string Id);
    }

    public class BTB_StaffUserDtoTwo
    {
        /// <summary>
        /// id
        /// </summary>
        public String id { get; set; }

        /// <summary>
        /// 昵称
        /// </summary>
        public String NickName { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        public Int32? Sex { get; set; }

        /// <summary>
        /// 头像
        /// </summary>
        public String HeadPortrait { get; set; }

        public int? HeadType { get; set; } = 0;
    }
    public class BTB_CommentD
    {
        /// <summary>
        /// 满意人数
        /// </summary>
        public int PeopleCount { get; set; }
        /// <summary>
        /// 满意度
        /// </summary>
        public decimal satisfaction { get; set; }
        /// <summary>
        /// 总人数
        /// </summary>
        public int Count { get; set; }

    }

    public class BTB_CommentdTO
    {
        public String Id { get; set; }

        /// <summary>
        /// CreatorId
        /// </summary>
        public String CreatorId { get; set; }

        /// <summary>
        /// CreateTime
        /// </summary>
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// Deleted
        /// </summary>
        public Boolean? Deleted { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        public String Comment_Content { get; set; }

        /// <summary>
        /// 标签
        /// </summary>
        public String Comment_Flag { get; set; }

        /// <summary>
        /// 图片
        /// </summary>
        public String Comment_Image { get; set; }

        /// <summary>
        /// 星级
        /// </summary>
        public int Comment_State { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public Int32? Orderbys { get; set; }

        /// <summary>
        /// 评论置顶
        /// </summary>
        public Int32? Top_Status { get; set; }

        /// <summary>
        /// Parent_Id
        /// </summary>
        public String Parent_Id { get; set; }

        /// <summary>
        /// 产品Id
        /// </summary>
        public String Product_Id { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        public String ProductName { get; set; }

        /// <summary>
        /// 产品
        /// </summary>
        public Order_Decimal Product { get; set; }

        /// <summary>
        /// 评价人
        /// </summary>
        public String CreteName { get; set; }

        /// <summary>
        /// 评价人
        /// </summary>
        public BTB_StaffUserDtoTwo _StaffUsers { get; set; }

        /// <summary>
        /// 评价状态0:待审核，1：审核通过，2审核不通过
        /// </summary>
        public int? State { get; set; }

        /// <summary>
        /// 子集评论
        /// </summary>
        public IEnumerable<BTB_CommentdTO> _CommentdTOs { get; set; }
    }

    public class BTB_CommenTwo
    {
        public String Id { get; set; }

        /// <summary>
        /// 评价状态0:待审核，1：审核通过，2审核不通过
        /// </summary>
        public int? State { get; set; }
    }
}